package com.css.apps.base.ip.action;

import com.css.apps.base.ip.model.SIp;
import com.css.apps.base.ip.service.IpService;
import com.css.core.model.IServiceResult;
import com.css.util.Ajax;
import com.css.webbase.webwork.action.AdminAction;
import com.opensymphony.xwork.ModelDriven;

@SuppressWarnings("serial")
public class AddIp extends AdminAction implements ModelDriven {
	
	private SIp sip;

	public AddIp() {
		this.sip = new SIp();
	}

	protected String adminGo() {
		IServiceResult<?> res = IpService.addIp(sip);
		result = Ajax.JSONResult(res.getResultCode(), res.getResultDesc());
		return res.toActionResult();
	}

	public SIp getModel() {
		return sip;
	}

	public SIp getSip() {
		return sip;
	}

	public void setSip(SIp sip) {
		this.sip = sip;
	}
}
